import java.util.Timer;
import java.util.TimerTask;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: rei
 * Date: 2025-11-06
 * Time: 15:33
 */
public class Test_Timer {
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("任务1....");
            }
        },1000);timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("任务2....");
            }
        },2000);timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("任务3....");
            }
        },3000);
    }
}
